using System;
using System.Collections.Generic;

using SMSSender.Entities.Utils;
using SMSSender.Entities.Models;
using SMSSender.DAL;
using SMSSender.Common;

namespace SMSSender.Biz
{
	public class CustomerRoleHistoryService
	{
		/// <summary>
		/// Saves a record to the CustomerRoleHistory table.
		/// </summary>
		public virtual void Insert(CustomerRoleHistoryInfo customerRoleHistoryInfo)
		{
			try
			{
				new CustomerRoleHistoryDAO().Insert(customerRoleHistoryInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("SMSSender.Biz.CustomerRoleHistory - Insert", ex);
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the CustomerRoleHistory table.
		/// </summary>
		public virtual void Update(CustomerRoleHistoryInfo customerRoleHistoryInfo)
		{
			try
			{
				new CustomerRoleHistoryDAO().Update(customerRoleHistoryInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("SMSSender.Biz.CustomerRoleHistory - Update", ex);
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the CustomerRoleHistory table.
		/// </summary>
		public virtual void Delete(Guid? idAo)
		{
			try
			{
				new CustomerRoleHistoryDAO().Delete(idAo);
			}
			catch (Exception ex)
			{
				Logger.Error("SMSSender.Biz.CustomerRoleHistory - Delete", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the CustomerRoleHistory table.
		/// </summary>
		public virtual CustomerRoleHistoryInfo Select(Guid? idAo)
		{
			try
			{
				return new CustomerRoleHistoryDAO().Select(idAo);
			}
			catch (Exception ex)
			{
				Logger.Error("SMSSender.Biz.CustomerRoleHistory - Select", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the CustomerRoleHistory table.
		/// </summary>
		public List<CustomerRoleHistoryInfo> SelectAll()
		{
			try
			{
				return new CustomerRoleHistoryDAO().SelectAll();
			}
			catch (Exception ex)
			{
				Logger.Error("SMSSender.Biz.CustomerRoleHistory - SelectAll", ex);
				throw;
			}

		}

	}
}
